<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ThunarSimpleJob: Thunar Internal Functions Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Thunar Internal Functions Reference Manual">
<link rel="up" href="ch03.html" title="Parallel Tasks">
<link rel="prev" href="ThunarJob.html" title="ThunarJob">
<link rel="next" href="thunar-thunar-io-jobs.html" title="thunar-io-jobs">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#ThunarSimpleJob.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#ThunarSimpleJob.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ThunarJob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="thunar-thunar-io-jobs.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ThunarSimpleJob"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ThunarSimpleJob.top_of_page"></a>ThunarSimpleJob</span></h2>
<p>ThunarSimpleJob</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ThunarSimpleJob.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="ThunarSimpleJob.html#ThunarSimpleJobFunc" title="ThunarSimpleJobFunc ()">*ThunarSimpleJobFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ThunarJob.html" title="ThunarJob"><span class="returnvalue">ThunarJob</span></a> *
</td>
<td class="function_name">
<a class="link" href="ThunarSimpleJob.html#thunar-simple-job-new" title="thunar_simple_job_new ()">thunar_simple_job_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GArray</span> *
</td>
<td class="function_name">
<a class="link" href="ThunarSimpleJob.html#thunar-simple-job-get-param-values" title="thunar_simple_job_get_param_values ()">thunar_simple_job_get_param_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ThunarSimpleJob.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/exo-2/ExoJob.html#ExoJob-struct">ExoJob</a>
        <span class="lineart">╰──</span> <a class="link" href="ThunarJob.html" title="ThunarJob">ThunarJob</a>
            <span class="lineart">╰──</span> ThunarSimpleJob
</pre>
</div>
<div class="refsect1">
<a name="ThunarSimpleJob.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="ThunarSimpleJob.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ThunarSimpleJobFunc"></a><h3>ThunarSimpleJobFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
<span class="c_punctuation">(</span>*ThunarSimpleJobFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="ThunarJob.html" title="ThunarJob"><span class="type">ThunarJob</span></a> *job</code></em>,
                        <em class="parameter"><code><span class="type">GArray</span> *param_values</code></em>,
                        <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Used by the <a class="link" href="ThunarSimpleJob.html" title="ThunarSimpleJob"><span class="type">ThunarSimpleJob</span></a> to process the <em class="parameter"><code>job</code></em>
. See <a class="link" href="ThunarSimpleJob.html#thunar-simple-job-new" title="thunar_simple_job_new ()"><code class="function">thunar_simple_job_new()</code></a>
for further details.</p>
<div class="refsect3">
<a name="ThunarSimpleJobFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>job</p></td>
<td class="parameter_description"><p>a <a class="link" href="ThunarJob.html" title="ThunarJob"><span class="type">ThunarJob</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param_values</p></td>
<td class="parameter_description"><p>a <span class="type">GArray</span> of the <span class="type">GValue</span>s passed to
<a class="link" href="ThunarSimpleJob.html#thunar-simple-job-new" title="thunar_simple_job_new ()"><code class="function">thunar_simple_job_new()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for errors.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ThunarSimpleJobFunc.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> in case of an error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="thunar-simple-job-new"></a><h3>thunar_simple_job_new ()</h3>
<pre class="programlisting"><a class="link" href="ThunarJob.html" title="ThunarJob"><span class="returnvalue">ThunarJob</span></a> *
thunar_simple_job_new (<em class="parameter"><code><a class="link" href="ThunarSimpleJob.html#ThunarSimpleJobFunc" title="ThunarSimpleJobFunc ()"><span class="type">ThunarSimpleJobFunc</span></a> func</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> n_param_values</code></em>,
                       <em class="parameter"><code>...</code></em>);</pre>
<p>Allocates a new <a class="link" href="ThunarSimpleJob.html" title="ThunarSimpleJob"><span class="type">ThunarSimpleJob</span></a>, which executes the specified
<em class="parameter"><code>func</code></em>
 with the specified parameters.</p>
<p>Use <a href="/usr/share/gtk-doc/html/exo-2/ExoJob.html#exo-job-launch"><code class="function">exo_job_launch()</code></a> to launch the returned job..</p>
<p>For example the listdir <em class="parameter"><code>func</code></em>
 expects a <span class="type">ThunarPath</span> for the
folder to list, so the call to <a class="link" href="ThunarSimpleJob.html#thunar-simple-job-new" title="thunar_simple_job_new ()"><code class="function">thunar_simple_job_new()</code></a>
would look like this:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">job</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">thunar_simple_job_new</span><span class="w"> </span><span class="p">(</span><span class="n">_thunar_io_jobs_listdir</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w">                             </span><span class="n">THUNAR_TYPE_PATH</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="p">);</span><span class="w"></span>
<span class="n">exo_job_launch</span><span class="w"> </span><span class="p">(</span><span class="n">EXO_JOB</span><span class="w"> </span><span class="p">(</span><span class="n">job</span><span class="p">));</span><span class="w"></span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>The caller is responsible to release the returned object using
<code class="function">thunar_job_unref()</code> when no longer needed.</p>
<div class="refsect3">
<a name="thunar-simple-job-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>the <a class="link" href="ThunarSimpleJob.html#ThunarSimpleJobFunc" title="ThunarSimpleJobFunc ()"><span class="type">ThunarSimpleJobFunc</span></a> to execute the job.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_param_values</p></td>
<td class="parameter_description"><p>the number of parameters to pass to the <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of <span class="type">GType</span> and parameter pairs (exactly
<em class="parameter"><code>n_param_values</code></em>
pairs) that are passed to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="thunar-simple-job-new.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="ThunarJob.html" title="ThunarJob"><span class="type">ThunarJob</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="thunar-simple-job-get-param-values"></a><h3>thunar_simple_job_get_param_values ()</h3>
<pre class="programlisting"><span class="returnvalue">GArray</span> *
thunar_simple_job_get_param_values (<em class="parameter"><code><a class="link" href="ThunarSimpleJob.html" title="ThunarSimpleJob"><span class="type">ThunarSimpleJob</span></a> *job</code></em>);</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>